#include "Mesh.h"

using namespace cmn;

namespace drawing {

	Mesh::Mesh() {}

	Mesh::Mesh(
		const cmn::IIterable<cmn::Vec3>& positions,
		const cmn::IIterable<cmn::Vec2>& texCoords,
		const cmn::IIterable<cmn::Vec3>& normals,
		const cmn::IIterable<Face>& faces	) :
	Positions( positions ),
	TexCoords( texCoords ),
	Normals( normals ),
	Faces( faces )
	{}

	Mesh::~Mesh() {}

	Mesh::Mesh( const Mesh& other ) :
		Positions( other.Positions ),
		TexCoords( other.TexCoords ),
		Normals( other.Normals ),
		Faces( other.Faces )
	{}

	Mesh& Mesh::operator=( const Mesh& rhs ) {
		if( this == &rhs ) return *this; // handle self assignment

		Positions = rhs.Positions;
		TexCoords = rhs.TexCoords;
		Normals = rhs.Normals;
		Faces = rhs.Faces;

		return *this;
	}
}
